; Music of Octoplex (1989) (Mastertronic) (Tiny Williams)
; Ripped by Megachur the 11/02/2007

	write "OCTOPLEX.BIN"

music_date_rip	equ &0b27
music_adr	equ &8800
first_theme	equ 0
last_theme	equ 1

	read "music_header_v1_0.asm"
	
;org #8aa5
;db "namexA daM ehT yniT 8891 )c("

	xor a		; test player !
	call l8814
.l8804
	call #bd19
	call l88a3
	ld a,#42
	call #bb1e
	jr z,l8804
	jp l8928
;
.init_music             ; a = 0,1
.l8814
;
	add a
	add a
	add a
	add l90a8	; #a8
	ld e,a
	adc l90a8/&100	; #90
	sub e
	ld d,a
	push de
	call l8928
	pop de
	ld a,(de)
	inc de
	ld (l88c3),a
	ld h,music_begin/&100+3+1	; #8b
	call l883c
	call l883c
	call l883c
	ld a,#01
	ld (l88a7),a
	ld (l8963),a
	ret
.l883c
	ld l,#05
	ld (hl),#01
	dec l
	xor a
	ld (hl),a
	ld l,#07
	ld (hl),a
	ld l,#09
	ld (hl),a
	ld l,#15
	ld (hl),a
	ld a,(de)
	inc de
	ld c,a
	ld a,(de)
	inc de
	ld b,a
	ld l,#02
	ld a,(bc)
	ld (hl),a
	inc bc
	inc l
	ld a,(bc)
	ld (hl),a
	inc bc
	ld l,#00
	ld (hl),c
	inc l
	ld (hl),b
	inc h
	ret
.l8863 equ $ + 1
	ld l,#00
	inc l
	dec l
	jr z,l886c
	cp l
	jr z,l886c
	ret nc
.l886c
	ld (l8863),a
	add a
	add l9537	; #37
	ld l,a
	adc l9537/&100	; #95
	sub l
	ld h,a
	ld de,l8e02
	ldi
	ex de,hl
	ld a,(de)
	ld (hl),a
	ld d,a
	dec l
	ld e,(hl)
	xor a
	ld l,#04
	ld (hl),a
	ld l,#15
	ld (hl),a
	ld l,#16
	ld (hl),#01
	ld a,(l8953)
	ld (l8a69),a
	jp l899f
.l8896
	ld a,(l8863)
	or a
	ret z
	call l88f2
	ld h,music_begin/&100+6+1 ; #8e
	jp l88e5
;
.play_music
.l88a3
;
	call l893f
.music_end equ $ + 1
.l88a7 equ $ + 1
	ld a,#00
	or a
	jr z,l8896
	ld hl,l8963
	dec (hl)
	ld h,music_begin/&100+3+1 ; #8b
	call l8950
	inc h
	call l8950
	inc h
	call l8950
	ld a,(l8963)
	or a
	jr nz,l88c7
.l88c3 equ $ + 1
	ld a,#01
	ld (l8963),a
.l88c7
	ld a,(l88a7)
	or a
	jr z,l8896
	ld a,(l8863)
	or a
	jr nz,l88d8
	ld a,music_begin/&100+5+1 ; #8d
	ld (l88e4),a
.l88d8
	call l88f2
	ld h,music_begin/&100+3+1 ; #8b
	call l88e5
	call l88e5
.l88e4 equ $ + 1
	ld h,music_begin/&100+3+1 ; #8b
.l88e5
	ld l,#06
	call l890c
	call l890c
	call l890c
	inc h
	ret
.l88f2
	ld de,#f4f6
	ld b,e
	in a,(c)
	or #c0
	ld (l8914),a
	ld a,#06
.l8900 equ $ + 1
	ld c,#01
	call l8910
	ld a,(l8953)
	ld c,a
	ld a,#07
	jr l8910
.l890c
	ld a,(hl)
	inc l
	ld c,(hl)
	inc l
.l8910
	ld b,d
	out (c),a
.l8914 equ $ + 1
	ld a,#c0
	ld b,e
	out (c),a
	and #3f
	out (c),a
	ld b,d
	out (c),c
	ld b,e
	ld c,a
	or #80
	out (c),a
	out (c),c
	ret
;
.stop_music
.l8928
;
	xor a
	ld de,#f4f6
	ld (l88a7),a
	ld (l8863),a
	ld (l8bcc),a
	ld a,#3f
	ld (l8953),a
	ld c,a
	ld a,#07
	jr l8910
.l893f
	ld a,(l8863)
	or a
	ret z
	ld hl,l8e02
	ld a,h
	ld (l88e4),a
	ld e,(hl)
	inc l
	ld d,(hl)
	jr l8967
.l8950
	ld l,#20
.l8953 equ $ + 1
	ld a,#3f
	and (hl)
	jr nz,l895d
	ld l,#07
	ld a,(hl)
	ld (l8900),a
.l895d
	ld l,#02
	ld e,(hl)
	inc l
	ld d,(hl)
.l8963 equ $ + 1
	ld a,#00
	or a
	jr nz,l8972
.l8967
	ld l,#05
	dec (hl)
	jr z,l899f
	call l8ba5
	call l8a48
.l8972
	call l8da7
	call l8d34
	call l8d2d
	call l8d68
	call l8bb0
	call l8ce7
	ld l,#04
	bit 5,(hl)
	ret z
	ld a,r
	and #07
	ld c,a
	ld l,#07
	ld a,(l8b07)
	add c
	ld (hl),a
	ld a,(l8b09)
	ld l,#09
	ld (hl),a
	ret nc
	inc (hl)
	ret
.l899e
	inc de
.l899f
	ld a,(de)
	inc de
	or a
	jp m,l89d6
	ld l,#0c
	ld (hl),a
	ld l,#02
	ld (hl),e
	inc l
	ld (hl),d
	call l8bcb
	ld l,#14
	ld a,(hl)
	ld l,#0b
	ld (hl),a
	ld l,#0d
	ld a,(hl)
	ld l,#05
	ld (hl),a
	ld l,#18
	ld (hl),#00
	ld l,#0e
	call l89c6
	inc l
.l89c6
	ld a,(hl)
	ld c,a
	and #0f
	inc l
	ld (hl),a
	ld a,c
	rra
	rra
	rra
	rra
	and #0f
	inc l
	ld (hl),a
	ret
.l89d6
	cp #e0
	jr nc,l89f6
	cp #d0
	jr nc,l8a06
	cp #c0
	jr nc,l89fe
	cp #b0
	jr nc,l8a2c
	ld c,h
	add a
	add l8c2d	; #2d
	ld l,a
	adc l8c2d/&100	; #8c
	sub l
	ld h,a
	ld a,c
	ld c,(hl)
	inc hl
	ld b,(hl)
	ld h,a
	push bc
	ret
.l89f6
	sub #df
	ld l,#0d
	ld (hl),a
	jp l899f
.l89fe
	sub #c0
	ld l,#14
	ld (hl),a
	jp l899f
.l8a06
	sub #d0
	ld l,#14
	ld (hl),a
	ex de,hl
	ld e,#0e
	ldi
	ld e,#11
	ldi
	ex de,hl
	ld a,(de)
	rra
	rra
	rra
	rra
	and #0f
	ld l,#19
	ld (hl),a
	inc l
	ld (hl),a
	ld a,(de)
	and #0f
	ld l,#1b
	ld (hl),a
	inc l
	ld (hl),a
	jp l899e
.l8a2c
	sub #b0
	add a
	add l8a8b	; #8b
	ld c,a
	adc l8a8b/&100	; #8a
	sub c
	ld b,a
	ld a,(bc)
	ld l,#21
	ld (hl),a
	inc l
	inc bc
	ld a,(bc)
	ld (hl),a
	inc l
	ld (hl),#00
	ld l,#04
	set 0,(hl)
	jp l899f
.l8a48
	ld l,#16
	ld a,(hl)
	ld l,#05
	cp (hl)
	ret nz
	ld a,(de)
	cp #8e
	ret z
	ld l,#18
	ld (hl),#01
	ld l,#15
	ld (hl),#00
	ld l,#04
	res 1,(hl)
	ret
.l8a60
	xor a
	ld (l8863),a
	ld a,(l88a7)
	or a
.l8a69 equ $ + 1
	ld a,#00
	ld (l8953),a
	ret nz
	or #24
	ld (l8953),a
	jp l88f2
.l8a76
	ld a,(de)
	ld (l8bcc),a
	jp l899e
.l8a7d
	ld l,#04
	set 5,(hl)
	jp l899f
.l8a84
	ld l,#04
	res 5,(hl)
	jp l899f
.l8a8b
	dw l8a93,l8a9f,l8aa3,l8aa5
.l8a93
	db #02,#0e,#03,#0f,#02,#0e,#01,#0d
.l8a9f equ $ + 4
	db #00,#0c,#00,#8c,#00,#00,#00,#8c
.l8aa3
	db #00,#8c
.l8aa5
	db #6e,#61,#6d,#65,#78,#41,#20,#64
	db #61,#4d,#20,#65,#68,#54,#20,#79
	db #6e,#69,#54,#20,#38,#38,#39,#31
	db #20,#29,#63,#28
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
.l8b05 equ $ + 4
.l8b06 equ $ + 5
.l8b07 equ $ + 6
	db #00,#00,#00,#00,#00,#00,#00,#01
.l8b09
	db #00,#08,#0f,#00,#04,#00,#00,#00
	db #00,#00,#00,#0f,#00,#00,#00,#00
.l8b20 equ $ + 7
	db #00,#00,#00,#00,#00,#00,#01,#08
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00
.l8b2d
	ld l,#04
	res 2,(hl)
	jp l899f
.l8b34
	call l8b8d
	ld l,#1f
.l8b39
	ld a,(hl)
.l8b3a
	cpl
	and c
	ld c,a
	ld l,#04
	res 4,(hl)
	ld a,h
	cp #8d
	jr z,l8b4d
.l8b46
	ld a,c
	ld (l8953),a
	jp l899f
.l8b4d
	ld a,(l8863)
	or a
	jr z,l8b46
	ld a,c
	ld (l8a69),a
	jp l899f
.l8b5a
	call l8b8d
	ld l,#20
	jr l8b39
.l8b61
	call l8b8d
	ld l,#1f
	ld a,(hl)
	inc l
	or (hl)
	jr l8b3a
.l8b6b
	call l8b8d
	ld l,#20
	ld a,(hl)
	cpl
	and c
	ld (l8953),a
	ld l,#04
	set 4,(hl)
	jp l899f
.l8b7d
	ld l,#0b
	ld (hl),#00
.l8b81
	ld l,#0d
	ld a,(hl)
	ld l,#05
	ld (hl),a
	ld l,#02
	ld (hl),e
	inc l
	ld (hl),d
	ret
.l8b8d
	ld a,(l8953)
	ld l,#1f
	or (hl)
	inc l
	or (hl)
	ld c,a
	ret
.l8b97
	ld l,#15
	ld (hl),#01
	jp l899f
.l8b9e
	ld l,#15
	ld (hl),#ff
	jp l899f
.l8ba5
	ld l,#15
	ld a,(hl)
	or a
	ret z
	ld l,#0c
	add (hl)
	ld (hl),a
	jr l8bcb
.l8bb0
	ld l,#04
	bit 0,(hl)
	ret z
	ld l,#21
	ld a,(hl)
	inc l
	ld b,(hl)
	inc l
	add (hl)
	ld c,a
	jr nc,l8bc0
	inc b
.l8bc0
	inc (hl)
	ld a,(bc)
	or a
	jp p,l8bc8
	ld (hl),#00
.l8bc8
	ld l,#0c
	add (hl)
.l8bcc equ $ + 1
.l8bcb
	add #00
	add a
	add l9000	; #00
	ld c,a
	adc l9000/&100	; #90
	sub c
	ld b,a
	ld a,(bc)
	inc bc
	ld l,#07
	ld (hl),a
	ld a,(bc)
	ld l,#09
	ld (hl),a
	ld l,#04
	bit 2,(hl)
	ret z
	push de
	ld l,#27
	ld e,(hl)
	inc l
	ld d,(hl)
	ld l,#07
	ld c,(hl)
	ld l,#09
	ld b,(hl)
	ex de,hl
	add hl,bc
	ex de,hl
	ld (hl),d
	ld l,#07
	ld (hl),e
	pop de
	ld l,#29
	ld a,(hl)
	ld l,#26
	ld (hl),a
	ret
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #02,#00,#03,#00,#09,#0f,#00,#04
	db #00,#00,#00,#00,#00,#00,#0f,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#02,#10,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00
.l8c2d
	dw l8cc6,l8b97,l8b9e,l8c73
	dw l8c8d,l8c94,l8ca5,l8b2d
	dw l8c59,l8c6c,l8b34,l8b5a
	dw l8b61,l8b6b,l8b81,l8b7d
	dw l8a76,l8928,l8a7d,l8a84
	dw l8cbe,l8a60
.l8c59
	ex de,hl
	ld e,#2a
	ldi
	ld a,(hl)
	ldi
	ld (de),a
	ex de,hl
	ld l,#04
	set 3,(hl)
	set 6,(hl)
	jp l899f
.l8c6c
	ld l,#04
	res 3,(hl)
	jp l899f
.l8c73
	ld a,(de)
	inc de
	ld l,#16
	ld (hl),a
	ld a,(de)
	rra
	rra
	rra
	rra
	and #0f
	ld l,#1d
	ld (hl),a
	inc l
	ld (hl),a
	ld a,(de)
	and #0f
	ld l,#17
	ld (hl),a
	jp l899e
.l8c8d
	ld l,#04
	res 0,(hl)
	jp l899f
.l8c94
	ex de,hl
	ld e,#24
	ldi
	ldi
	ldi
	ex de,hl
	ld l,#04
	set 1,(hl)
	jp l899f
.l8ca5
	ex de,hl
	ld e,#27
	ldi
	ldi
	ld e,#24
	ldi
	ldi
	ld e,#29
	ldi
	ex de,hl
	ld l,#04
	set 2,(hl)
	jp l899f
.l8cbe
	ld l,#00
	ex de,hl
	ldi
	ldi
	ex de,hl
.l8cc6
	ld l,#00
	ld c,(hl)
	inc l
	ld b,(hl)
	ld a,(bc)
	ld e,a
	inc bc
	ld a,(bc)
	inc bc
	ld d,a
	or e
	jr z,l8cdf
	ld (hl),b
	dec l
	ld (hl),c
	inc l
	inc l
	ld (hl),e
	inc l
	ld (hl),d
	jp l899f
.l8cdf
	ld d,b
	ld e,c
	ld a,(l95ed)
	jp l89d6
.l8ce7
	ld l,#04
	bit 4,(hl)
	ret z
	ld l,#1f
	ld a,(hl)
	inc l
	or (hl)
	ld c,a
	ld a,(l8953)
	xor c
	ld (l8953),a
	ret
.l8cfa
	inc (hl)
	ret
	db #00,#00,#00,#00,#00,#00,#00,#00
.l8d06 equ $ + 2
.l8d05 equ $ + 1
	db #00,#00,#04,#00,#05,#00,#0a,#0f
	db #00,#04,#00,#00,#00,#00,#00,#00
	db #0f,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#04,#20,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00
.l8d2d
	ld l,#04
	bit 2,(hl)
	jr nz,l8d39
	ret
.l8d34
	ld l,#04
	bit 1,(hl)
	ret z
.l8d39
	ld l,#26
	dec (hl)
	jp m,l8cfa
	ld l,#25
	bit 7,(hl)
	jr nz,l8d54
	ld l,#24
	ld a,(hl)
	ld l,#07
	add (hl)
	ld (hl),a
	ld l,#25
	ld a,(hl)
	ld l,#09
	adc (hl)
	ld (hl),a
	ret
.l8d54
	ld l,#07
	ld a,(hl)
	ld l,#24
	sub (hl)
	ld l,#07
	ld (hl),a
	ld l,#25
	ld c,(hl)
	res 7,c
	ld l,#09
	ld a,(hl)
	sbc c
	ld (hl),a
	ret
.l8d68
	ld l,#04
	bit 3,(hl)
	ret z
	bit 6,(hl)
	jr z,l8d8b
	ld l,#2b
	dec (hl)
	jr nz,l8d7f
	inc l
	ld a,(hl)
	dec l
	ld (hl),a
	ld l,#04
	res 6,(hl)
	ret
.l8d7f
	ld l,#2a
	ld a,(hl)
	ld l,#07
	add (hl)
	ld (hl),a
	ret nc
	ld l,#09
	inc (hl)
	ret
.l8d8b
	ld l,#2b
	dec (hl)
	jr nz,l8d99
	inc l
	ld a,(hl)
	dec l
	ld (hl),a
	ld l,#04
	set 6,(hl)
	ret
.l8d99
	ld l,#07
	ld a,(hl)
	ld l,#2a
	sub (hl)
	ld l,#07
	ld (hl),a
	ret nc
	ld l,#09
	dec (hl)
	ret
.l8da7
	ld l,#0f
	ld a,(hl)
	or a
	jr z,l8dc2
	ld l,#19
	dec (hl)
	ret nz
	inc l
	ld a,(hl)
	dec l
	ld (hl),a
	ld l,#0f
	dec (hl)
	inc l
	ld a,(hl)
	ld l,#0b
	add (hl)
	cp #0f
	ret nc
	ld (hl),a
	ret
.l8dc2
	ld l,#12
	ld a,(hl)
	or a
	jr z,l8de0
	ld l,#1b
	dec (hl)
	ret nz
	inc l
	ld a,(hl)
	dec l
	ld (hl),a
	ld l,#12
	dec (hl)
	ld l,#0b
	ld a,(hl)
	ld l,#13
	sub (hl)
	jr nc,l8ddc
	xor a
.l8ddc
	ld l,#0b
	ld (hl),a
	ret
.l8de0
	ld l,#18
	ld a,(hl)
	or a
	ret z
	ld l,#1d
	dec (hl)
	ret nz
	inc l
	ld a,(hl)
	dec l
	ld (hl),a
	ld l,#0b
	ld a,(hl)
	ld l,#17
	sub (hl)
	jr nc,l8df6
	xor a
.l8df6
	ld l,#0b
	ld (hl),a
	ret
	db #00,#00,#00,#00,#00,#00,#00,#00
.l8e05 equ $ + 3
.l8e02
	db #00,#00,#00,#00,#04,#00,#05,#00
	db #0a,#0f,#00,#04,#00,#00,#00,#00
	db #00,#00,#0f,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#04,#20,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00,#00,#00
	db #00,#00,#00,#00,#00,#00
.l9000
	dw #077c,#0710,#06ab,#064b
	dw #05f1,#059b,#054b,#04ff
	dw #04b7,#0473,#0433,#03f7
	dw #03be,#0388,#0355,#0326
	dw #02f8,#02ce,#02a5,#027f
	dw #025c,#023a,#021a,#01fb
	dw #01df,#01c4,#01ab,#0193
	dw #017c,#0167,#0153,#0140
	dw #012e,#011d,#010d,#00fe
	dw #00f0,#00e2,#00d5,#00c9
	dw #00be,#00b3,#00a9,#00a0
	dw #0097,#008e,#0086,#007f
	dw #0078,#0071,#006b,#0065
	dw #005f,#005a,#0055,#0050
	dw #004b,#0047,#0043,#003f
	dw #003c,#0039,#0035,#0032
	dw #0030,#002d,#002a,#0028
	dw #0026,#0024,#0022,#0020
	dw #001e,#001c,#001b,#0019
	dw #0018,#0016,#0015,#0014
	dw #0013,#0012,#0011,#0010
.l90a8
	db #04
	dw l90bf,l90fd,l90d5
	db #00,#04
	dw l94cf,l94d1,l94d3
	db #00,#01
	dw l9536,l9536,l9536
.l90c3 equ $ + 4
.l90bf
	dw l911d,l9530,l913b,l91a2
	dw l91f8,l91a2,l928b,l9530
.l90d5 equ $ + 6
	dw l9530,#0000,l90c3,l92ca
	dw l92e1,l92e1,l92e1,l92e1
.l90e1 equ $ + 2
	dw l92fc,l93b2,l93b2,l93b2
	dw l9347,l9347,l93b2,l93b2
	dw l9347,l9347,l93b2,l93b2
.l90fd equ $ + 6
	dw l92fc,#0000,l90e1,l941d
	dw l943b,l943b,l943b,l943b
	dw l9487,l9487,l943b,l943b
	dw l9487,l9487,l943b,l943b
	dw l9530,#0000
.l911d equ $ + 2
	db #01,#91,#8a,#83,#04,#81,#84,#d4
	db #1b,#15,#42,#88,#01,#02,#ff,#26
	db #22,#21,#24,#1d,#21,#22,#24,#d4
	db #1b,#1f,#4f,#26,#8e,#8f,#8f,#80
.l913b
	db #8a,#84,#83,#01,#81,#88,#01,#02
	db #ff,#8f,#8f,#8f,#f3,#8f,#dd,#12
	db #13,#11,#e1,#1f,#8e,#21,#1f,#21
	db #8e,#83,#04,#81,#f3,#26,#83,#01
	db #41,#e1,#21,#8e,#22,#24,#26,#8e
	db #83,#06,#41,#ff,#29,#83,#01,#41
	db #eb,#2d,#e3,#2b,#29,#28,#8e,#ef
	db #2b,#e3,#29,#28,#eb,#29,#e3,#1a
	db #1d,#1f,#21,#26,#29,#2b,#2d,#88
	db #01,#01,#87,#32,#35,#37,#39,#3e
	db #41,#43,#45,#88,#01,#02,#e3,#2d
	db #8e,#2b,#e7,#29,#28,#eb,#2b,#e3
.l91a2 equ $ + 7
	db #29,#28,#8e,#2d,#8e,#87,#80,#8a
	db #84,#83,#01,#81,#dc,#13,#13,#32
	db #88,#01,#02,#f7,#29,#e3,#24,#e1
	db #29,#2d,#30,#8e,#eb,#2d,#e3,#2d
	db #30,#e7,#34,#83,#06,#81,#eb,#32
	db #83,#02,#81,#e3,#30,#e7,#2e,#2d
	db #eb,#30,#e3,#2e,#2d,#8e,#2e,#2d
	db #2b,#83,#0c,#81,#f3,#29,#e1,#24
	db #8e,#29,#2d,#30,#8e,#eb,#2d,#e3
	db #2d,#30,#e7,#34,#eb,#32,#e3,#30
	db #e7,#2e,#2d,#eb,#30,#e3,#2e,#2d
.l91f8 equ $ + 5
	db #8e,#2e,#2b,#2d,#80,#db,#00,#00
	db #00,#83,#00,#00,#87,#88,#01,#02
	db #e1,#37,#39,#37,#35,#37,#35,#34
	db #32,#35,#37,#35,#34,#35,#34,#32
	db #30,#2e,#30,#2e,#2d,#2e,#2d,#2b
	db #29,#2b,#2d,#2b,#29,#2b,#2d,#2e
	db #30,#2d,#30,#2d,#2b,#2d,#2b,#29
	db #2b,#2d,#30,#2d,#32,#30,#2e,#30
	db #32,#30,#34,#30,#35,#37,#35,#34
	db #35,#37,#39,#37,#35,#37,#39,#3a
	db #3c,#b1,#dc,#00,#16,#11,#43,#45
	db #43,#41,#43,#41,#40,#3e,#41,#43
	db #41,#40,#41,#40,#3e,#3c,#3a,#3c
	db #3a,#39,#3a,#39,#37,#35,#37,#39
	db #37,#35,#37,#39,#3a,#3c,#39,#3c
	db #39,#37,#39,#37,#35,#37,#39,#3c
	db #39,#3e,#3c,#3a,#3c,#3e,#3c,#40
	db #3c,#41,#43,#41,#40,#41,#84,#db
	db #00,#00,#00,#e7,#2b,#e3,#2d,#80
.l928b
	db #8a,#84,#dc,#13,#14,#22,#e3,#32
	db #ca,#32,#c9,#32,#c8,#32,#c7,#32
	db #c6,#32,#c5,#32,#c4,#32,#c2,#32
	db #c3,#32,#c5,#32,#c6,#32,#c7,#32
	db #c8,#32,#c9,#32,#ca,#32,#c9,#32
	db #32,#c8,#32,#32,#c7,#32,#32,#c6
	db #32,#32,#c5,#32,#32,#c4,#32,#32
.l92ca equ $ + 7
	db #c3,#32,#32,#c2,#32,#32,#80,#8a
	db #83,#04,#81,#84,#d4,#1b,#15,#42
	db #88,#01,#02,#ff,#2b,#26,#26,#28
.l92e1 equ $ + 6
	db #21,#24,#26,#28,#89,#80,#8a,#84
	db #83,#01,#22,#e1,#da,#11,#24,#11
	db #3e,#43,#3e,#45,#3e,#43,#3e,#45
	db #3e,#43,#3e,#45,#3e,#43,#3e,#45
.l92fc equ $ + 1
	db #80,#8a,#84,#83,#01,#22,#e1,#da
	db #11,#24,#11,#3e,#43,#3e,#45,#3e
	db #43,#3e,#45,#3e,#43,#3e,#45,#3e
	db #43,#3e,#45,#3e,#41,#3e,#46,#3e
	db #41,#3e,#46,#3e,#41,#3e,#46,#3e
	db #41,#3e,#46,#3e,#40,#3e,#45,#3e
	db #40,#3e,#45,#3e,#40,#3e,#45,#3e
	db #40,#3e,#45,#3c,#40,#3c,#43,#3c
	db #40,#3c,#43,#3c,#40,#3c,#43,#3c
.l9347 equ $ + 4
	db #40,#3c,#43,#80,#8a,#84,#83,#01
	db #11,#e1,#da,#11,#24,#11,#3c,#41
	db #3c,#45,#8b,#b0,#18,#8a,#84,#41
	db #3c,#45,#3c,#41,#3c,#45,#8b,#b0
	db #18,#8a,#84,#41,#3c,#45,#3c,#40
	db #3c,#45,#8b,#b0,#18,#8a,#84,#40
	db #3c,#45,#3c,#40,#3c,#45,#8b,#b0
	db #18,#8a,#84,#40,#3c,#45,#3e,#41
	db #3e,#46,#8b,#b0,#18,#8a,#84,#41
	db #3e,#46,#3e,#41,#3e,#46,#8b,#b0
	db #18,#8a,#84,#41,#3e,#46,#3c,#40
	db #3c,#43,#8b,#b0,#18,#8a,#84,#40
	db #3c,#43,#3c,#40,#3c,#43,#8b,#b0
.l93b2 equ $ + 7
	db #18,#8a,#84,#40,#3c,#43,#80,#8a
	db #84,#83,#01,#11,#e1,#da,#11,#24
	db #11,#3e,#43,#3e,#45,#8b,#b0,#18
	db #8a,#84,#43,#3e,#45,#3e,#43,#3e
	db #45,#8b,#b0,#18,#8a,#84,#43,#3e
	db #45,#3e,#41,#3e,#46,#8b,#b0,#18
	db #8a,#84,#41,#3e,#46,#3e,#41,#3e
	db #46,#8b,#b0,#18,#8a,#84,#41,#3e
	db #46,#3e,#40,#3e,#45,#8b,#b0,#18
	db #8a,#84,#40,#3e,#45,#3e,#40,#3e
	db #45,#8b,#b0,#18,#8a,#84,#40,#3e
	db #45,#3c,#40,#3c,#43,#8b,#b0,#18
	db #8a,#84,#40,#3c,#43,#3c,#40,#3c
	db #43,#8b,#b0,#18,#8a,#84,#40,#3c
.l941d equ $ + 2
	db #43,#80,#8a,#83,#04,#81,#84,#d4
	db #1b,#15,#42,#88,#01,#02,#ff,#2d
	db #29,#28,#2b,#24,#28,#29,#2b,#d4
	db #1b,#1f,#4f,#2d,#8e,#8f,#8f,#80
.l943b
	db #8a,#84,#83,#00,#00,#84,#dd,#12
	db #14,#11,#e1,#0e,#0e,#8e,#0e,#0e
	db #8e,#8e,#0e,#0e,#0e,#8e,#0e,#15
	db #13,#11,#8e,#0a,#0a,#8e,#0a,#0a
	db #8e,#8e,#0a,#0a,#0a,#8e,#0a,#11
	db #10,#0e,#8e,#09,#09,#8e,#09,#09
	db #8e,#8e,#09,#09,#09,#8e,#09,#0c
	db #0e,#10,#8e,#0c,#0c,#8e,#0c,#0c
	db #8e,#8e,#0c,#11,#1d,#10,#1c,#0e
.l9487 equ $ + 4
	db #1a,#10,#1c,#80,#8a,#84,#dd,#12
	db #14,#11,#e1,#05,#05,#8e,#05,#05
	db #8e,#8e,#05,#05,#05,#8e,#05,#09
	db #0a,#0c,#8e,#09,#09,#8e,#09,#09
	db #8e,#8e,#09,#09,#09,#8e,#09,#0c
	db #0e,#10,#8e,#0a,#0a,#8e,#0a,#0a
	db #8e,#8e,#0a,#0a,#0a,#8e,#0a,#11
	db #10,#0e,#8e,#0c,#0c,#8e,#0c,#0c
	db #8e,#8e,#0c,#11,#1d,#10,#1c,#0e
	db #1a,#10,#1c,#80
.l94d3 equ $ + 4
.l94d1 equ $ + 2
.l94cf
	dw l94d5,l94e6,l94f7
.l94d5
	db #8a,#84,#83,#03,#b1,#dc,#14,#16
	db #11,#e7,#26,#28,#2b,#2d,#ff,#26
.l94e6 equ $ + 1
	db #91,#8a,#84,#83,#03,#b1,#dc,#14
	db #16,#11,#e7,#2d,#2f,#32,#34,#ff
.l94f7 equ $ + 2
	db #2d,#91,#8a,#84,#83,#01,#11,#dc
	db #13,#16,#11,#e2,#32,#35,#e1,#39
	db #e2,#34,#38,#e1,#3b,#e2,#37,#3b
	db #e1,#3e,#e0,#40,#3e,#3c,#3b,#39
	db #3b,#37,#39,#e0,#3e,#40,#3e,#40
	db #3e,#40,#3e,#40,#3e,#40,#3e,#40
	db #3e,#40,#3e,#40,#3e,#40,#3e,#40
.l9530 equ $ + 3
	db #ef,#3e,#91,#ff,#8f,#8f,#8f,#8f
	db #80
.l9537 equ $ +1
.l9536
	db #38,#95,#91
	dw l954d,l9571,l9581,l958b
	dw l9599,l95a7,l95c1,l95ce
	dw l95ee,l9614
.l954d
	db #8a,#84,#83,#00,#00,#88,#02,#01
	db #df,#00,#00,#00,#e3,#85,#1f,#00
	db #10,#3e,#df,#00,#17,#11,#eb,#85
	db #1f,#00,#10,#48,#c8,#e7,#85,#1f
.l9571 equ $ + 4
	db #00,#10,#48,#95,#8a,#84,#eb,#dd
	db #00,#13,#11,#81,#2b,#ca,#81,#2b
.l9581 equ $ + 4
	db #c6,#81,#2b,#95,#8a,#b2,#f7,#df
.l958b equ $ + 6
	db #00,#1f,#16,#81,#2b,#95,#8a,#84
	db #f7,#df,#00,#15,#11,#85,#10,#00
.l9599 equ $ + 4
	db #3e,#37,#8e,#95,#8a,#84,#ff,#df
	db #00,#15,#11,#85,#80,#42,#3e,#54
.l95a7 equ $ + 2
	db #8e,#95,#8a,#84,#8d,#e3,#df,#00
	db #16,#11,#85,#50,#00,#0f,#1a,#ca
	db #85,#50,#00,#0f,#1a,#c6,#85,#50
.l95c1 equ $ + 4
	db #00,#0f,#1a,#95,#8a,#b1,#f7,#df
	db #00,#16,#11,#85,#80,#80,#1f,#4f
.l95ce equ $ + 1
	db #95,#dd,#00,#00,#00,#8a,#84,#e3
	db #4c,#4d,#4f,#51,#4f,#51,#53,#54
	db #c9,#4f,#51,#53,#54,#c4,#4f,#51
	db #53,#54,#c2,#4f,#51,#53,#54,#95
.l95ed
.l95ee equ $ + 1
	db #94,#8a,#84,#dd,#00,#18,#11,#e7
	db #32,#39,#32,#3e,#ca,#e5,#3e,#e1
	db #8f,#c7,#e5,#3e,#e1,#8f,#cd,#e7
	db #39,#ca,#e5,#39,#e1,#8f,#c7,#e5
.l9614 equ $ + 7
	db #39,#e1,#8f,#c4,#e5,#39,#95,#8a
	db #84,#ef,#8d,#dd,#12,#16,#11,#85
	db #80,#00,#28,#37,#c6,#85,#80,#00
	db #28,#37,#c4,#85,#60,#00,#28,#37
	db #95
;org #013a
;ld a,(#88a7)
;and a
;call z,#8814	; init

.game_name
	db "Octoplex",0
.game_year
	db "1989",0
.game_publisher
	db "Mastertronic",0
.music_author
	db "Tiny Williams",0
.music_comment
	db "namexA daM ehT yniT 8891 )c(",0

	read "music_end_v1_0.asm"

